﻿namespace WMS6.Web.BaseInfoServiceRef
{
    using System;
    using System.CodeDom.Compiler;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Runtime.Serialization;

    [Serializable, DebuggerStepThrough, DataContract(Name="UdfReportSettingInfo", Namespace="http://schemas.datacontract.org/2004/07/WMS6.DataEntity"), GeneratedCode("System.Runtime.Serialization", "3.0.0.0")]
    public class UdfReportSettingInfo : IExtensibleDataObject, INotifyPropertyChanged
    {
        [OptionalField]
        private string DataSourceName1Field;
        [OptionalField]
        private string DataSourceName2Field;
        [OptionalField]
        private string DataSqlField;
        [NonSerialized]
        private ExtensionDataObject extensionDataField;
        [OptionalField]
        private string RemarkField;
        [OptionalField]
        private string ReportFileField;
        [OptionalField]
        private string ReportIDField;
        [OptionalField]
        private string ReportNameField;
        [OptionalField]
        private int RowIDField;
        [OptionalField]
        private List<UdfReportSettingDetailInfo> UdfReportSettingDetailInfosField;
        [OptionalField]
        private string WhIDField;

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember]
        public string DataSourceName1
        {
            get
            {
                return this.DataSourceName1Field;
            }
            set
            {
                if (!object.ReferenceEquals(this.DataSourceName1Field, value))
                {
                    this.DataSourceName1Field = value;
                    this.RaisePropertyChanged("DataSourceName1");
                }
            }
        }

        [DataMember]
        public string DataSourceName2
        {
            get
            {
                return this.DataSourceName2Field;
            }
            set
            {
                if (!object.ReferenceEquals(this.DataSourceName2Field, value))
                {
                    this.DataSourceName2Field = value;
                    this.RaisePropertyChanged("DataSourceName2");
                }
            }
        }

        [DataMember]
        public string DataSql
        {
            get
            {
                return this.DataSqlField;
            }
            set
            {
                if (!object.ReferenceEquals(this.DataSqlField, value))
                {
                    this.DataSqlField = value;
                    this.RaisePropertyChanged("DataSql");
                }
            }
        }

        [Browsable(false)]
        public ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [DataMember]
        public string Remark
        {
            get
            {
                return this.RemarkField;
            }
            set
            {
                if (!object.ReferenceEquals(this.RemarkField, value))
                {
                    this.RemarkField = value;
                    this.RaisePropertyChanged("Remark");
                }
            }
        }

        [DataMember]
        public string ReportFile
        {
            get
            {
                return this.ReportFileField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ReportFileField, value))
                {
                    this.ReportFileField = value;
                    this.RaisePropertyChanged("ReportFile");
                }
            }
        }

        [DataMember]
        public string ReportID
        {
            get
            {
                return this.ReportIDField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ReportIDField, value))
                {
                    this.ReportIDField = value;
                    this.RaisePropertyChanged("ReportID");
                }
            }
        }

        [DataMember]
        public string ReportName
        {
            get
            {
                return this.ReportNameField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ReportNameField, value))
                {
                    this.ReportNameField = value;
                    this.RaisePropertyChanged("ReportName");
                }
            }
        }

        [DataMember]
        public int RowID
        {
            get
            {
                return this.RowIDField;
            }
            set
            {
                if (!this.RowIDField.Equals(value))
                {
                    this.RowIDField = value;
                    this.RaisePropertyChanged("RowID");
                }
            }
        }

        [DataMember]
        public List<UdfReportSettingDetailInfo> UdfReportSettingDetailInfos
        {
            get
            {
                return this.UdfReportSettingDetailInfosField;
            }
            set
            {
                if (!object.ReferenceEquals(this.UdfReportSettingDetailInfosField, value))
                {
                    this.UdfReportSettingDetailInfosField = value;
                    this.RaisePropertyChanged("UdfReportSettingDetailInfos");
                }
            }
        }

        [DataMember]
        public string WhID
        {
            get
            {
                return this.WhIDField;
            }
            set
            {
                if (!object.ReferenceEquals(this.WhIDField, value))
                {
                    this.WhIDField = value;
                    this.RaisePropertyChanged("WhID");
                }
            }
        }
    }
}

